<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="x" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	   *{
	   	   margin: 0px;
	   	   padding: 0px;
	   }
	   table,tr,td{
	   	  border:1px solid black;
	   }
	   table{
	   	  width: 800px;
	   	  margin:auto;
	   	  margin-top: 100px;
	   }
	   table tr td{
	   	  padding-left:30px;
	   }
	</style>
</head>
<body>
    <table>
        <tr>
            <td>序号</td>
            <td>用户名</td>
            <td>年龄</td>
            <td>性别</td>
        </tr>
        <x:forEach items="${requestScope.userList}" var="user">
              <tr>
	            <td>${user.id}</td>
	            <td>${user.name}</td>
	            <td>${user.age}</td>
	            <td>${user.sex}</td>
              </tr>
        </x:forEach>
    </table>
     <h2>  
           <a href="UserServlet?currentPageNum=1">第一页</a>
           <a href="UserServlet?currentPageNum=${requestScope.currentPageNum-1}">上一页</a>
           <a href="UserServlet?currentPageNum=${requestScope.currentPageNum+1}">下一页</a>
           <a href="UserServlet?currentPageNum=${requestScope.pageNum}">最后一页</a>
        </h2>
</body>
</html>